package br.unb.mestrado.simulator.model.qos;

public class QoSParameter {
	
	public static final String BATTERY = "battery_qos";
	public static final String SAMPLE_FREQUENCY = "sample_frequency_qos";
	public static final String ENABLED = "enabled_qos";
	
	private String name = null;
	private Object value = null;
	private String featureName = null; 
	
	public QoSParameter(String name, Object value, String featureName) {
		super();
		this.name = name;
		this.value = value;
		this.featureName = featureName;
	}
	public String getName() {
		return name;
	}
	public Object getValue() {
		return value;
	}
	public String getFeatureName() {
		return featureName;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((featureName == null) ? 0 : featureName.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		QoSParameter other = (QoSParameter) obj;
		if (featureName == null) {
			if (other.featureName != null)
				return false;
		} else if (!featureName.equals(other.featureName))
			return false;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		return true;
	}
	
	
}
